function opIDs = GiveMeFeatureSet(whatFeatureSet,Operations)

%-------------------------------------------------------------------------------
if nargin < 1 || isempty(whatFeatureSet)
    whatFeatureSet = 'catch22';
end
if nargin < 2
    error('You must provide an Operations table to match features to by name');
end
%-------------------------------------------------------------------------------

switch whatFeatureSet
case 'sarab16'
    % Sarab's top 16 features
    featureNames = {'DN_HistogramMode_10', ...
                    'AC_9', ...
                    'first_min_acf', ...
                    'SY_StdNthDer_1', ...
                    'CO_trev_1_num', ...
                    'CO_Embed2_Basic_tau_incircle_1', ...
                    'CO_Embed2_Basic_tau_incircle_2', ...
                    'SY_SpreadRandomLocal_ac2_100_meantaul', ...
                    'SY_SpreadRandomLocal_50_100_meantaul', ...
                    'PH_Walker_prop_01_sw_propcross', ...
                    'EN_SampEn_5_03_sampen1', ...
                    'FC_LocalSimple_mean1_taures', ...
                    'FC_LocalSimple_lfittau_taures', ...
                    'DN_OutlierInclude_abs_001_mdrmd', ...
                    'SB_MotifTwo_mean_hhh', ...
                    'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1'};
case 'catch22'
    % The catch22 feature set:
    % cf. https://github.com/chlubba/catch22
    featureNames = {'DN_HistogramMode_5', ...
                    'DN_HistogramMode_10', ...
                    'first1e_acf_tau', 'first_1e_ac', ... % (new name)
                    'firstMin_acf', 'first_min_acf', ... % (new name)
                    'CO_HistogramAMI_even_2_5', ...
                    'CO_trev_1_num', ...
                    'MD_hrv_classic_pnn40', ...
                    'SB_BinaryStats_mean_longstretch1', ...
                    'SB_TransitionMatrix_3ac_sumdiagcov', ...
                    'PD_PeriodicityWang_th0.01', ...
                    'CO_Embed2_Dist_tau_d_expfit_meandiff', ...
                    'IN_AutoMutualInfoStats_40_gaussian_fmmi', ...
                    'FC_LocalSimple_mean1_tauresrat', ...
                    'DN_OutlierInclude_p_001_mdrmd', ...
                    'DN_OutlierInclude_n_001_mdrmd', ...
                    'SP_Summaries_welch_rect_area_5_1', ...
                    'SB_BinaryStats_diff_longstretch0', ...
                    'SB_MotifThree_quantile_hh', ...
                    'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', ...
                    'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', ...
                    'SP_Summaries_welch_rect_centroid', ...
                    'FC_LocalSimple_mean3_stderr'};
otherwise
    error('Unknown feature set ''%s''',whatFeatureSet);
end

opIDs = Operations.ID(ismember(Operations.Name,featureNames));
fprintf(1,'Matched %u/%u features!\n',length(opIDs),length(featureNames));

if length(opIDs) < length(featureNames)
    didNotMatch = find(~ismember(featureNames,Operations.Name));
    for i = 1:length(didNotMatch)
        fprintf(1,'''%s'' does not exist in the HCTSA dataset\n',featureNames{didNotMatch(i)});
    end
end

end
